import Vue from 'vue'

let server = process.env.VUE_APP_RESTAURANTPCSERVICE;
let getOrderByOrderInfoUrl = '/goodorder/getOrderByOrderInfo';
let getDetailInfoUrl = '/goodorder/getDetail';
let updateBackUrl = '/goodorder/updateBack';
let searchByKindUrl = '/user/searchByKind';
let getnumberoftodayUrl = '/goodorder/getnumberoftoday';

export default{
	getOrderByOrderInfoService: function(paramsObj,params,callBack){
		Vue.axios.post(`${server}${getOrderByOrderInfoUrl}`, paramsObj,{
			params:params
		}).then(res => {
			callBack(res.data);
		})
	},
	getDetailService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${getDetailInfoUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	updateBackService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${updateBackUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	searchByKindService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${searchByKindUrl}`,{} ,{
			params:paramsObj
		}).then(res => {
			callBack(res.data);
		})
	},
	getnumberoftodayService: function(callBack){
		Vue.axios.get(`${server}${getnumberoftodayUrl}`).then(res => {
			callBack(res.data);
		})
	},
}